Skip to content

feat(schemas): add sdd-plus-superpowers — integrate Superpowers skills via custom schema (ref #780)#970

Open
JiangWay wants to merge 6 commits intoFission-AI:mainfrom
JiangWay:main
Open

feat(schemas): add sdd-plus-superpowers — integrate Superpowers skills via custom schema (ref #780)#970
JiangWay wants to merge 6 commits intoFission-AI:mainfrom
JiangWay:main

Conversation

@JiangWay
Copy link
Copy Markdown

@JiangWay JiangWay commented Apr 14, 2026

Context

This PR addresses #780 — the request to distribute OpenSpec as a Superpowers skill pack so that both frameworks can coexist without manual coordination.

In my comment on that issue I suggested that the cleanest path forward is not packaging one inside the other, but using OpenSpec's own project-level schema mechanism to wire Superpowers skills into the artifact lifecycle. I shared an early fork-based draft at that time:

https://github.com/JiangWay/OpenSpec/tree/6449135b7ca301bf7d19a6c9cb3c331c051205f3/schemas/sdd-plus-superpowers

This PR contributes the refined, upstream-ready version of that schema, with several corrections and additions made after real-world use.

Why a custom schema (instead of a skill pack)

Distributing OpenSpec as a Superpowers skill pack would require maintaining /opsx:* commands in two places, and would blur the line between OpenSpec's CLI (which enforces artifact structure) and Superpowers' skill system (which is prompt-only). A custom schema is strictly better because:

  • It uses existing OpenSpec machinery (schemas/, --schema <name> at change creation, native validation).
  • It does not modify the OpenSpec CLI or any Superpowers skill file — integration is purely at the instruction: prompt layer.
  • It is opt-in per change, so projects that don't use Superpowers are unaffected.
  • It is discoverable via openspec schemas, which is exactly the discovery mechanism [Feature Request] Distribute OpenSpec as a Superpowers (obra/superpowers) skill pack #780 asks for.

What this schema does

sdd-plus-superpowers extends spec-driven with:

  • A brainstorming entry point — the first artifact invokes superpowers:brainstorming, with output redirected into the change directory so both systems share a single source of truth instead of writing to docs/superpowers/....
  • A micro-task plan step — after tasks.md (coarse checkboxes), a plan.md artifact invokes superpowers:writing-plans to decompose work into 2-5 minute TDD steps.
  • An apply phase wired to Superpowers executionusing-git-worktreessubagent-driven-development (with transitive TDD + code-review) → openspec-verify-changefinishing-a-development-branch.
  • A post-implementation verify artifact — runs 5 checks (structural validation, task completion, delta-spec sync state, design/spec coherence, implementation signal) and records results.

Artifact DAG

brainstorm ──► proposal ──► specs ──► tasks ──► plan ──► [apply phase] ──► verify
     │                                                                        ▲
     └──► design (optional leaf)                                               │
                                                                               │
                               apply reads tasks.md, produces code ────────────┘

Two things worth flagging:

  • design is an optional leaf. Brainstorming may pre-fill design.md, but tasks.requires: [specs] only — matching OpenSpec conventions that design docs exist only for non-trivial technical decisions.
  • verify.requires: [plan] is structural. The instruction explicitly states verify MUST run on a completed implementation. The DAG edge exists so openspec status can surface verification progress; the timing is intentional.

Apply-phase integration

apply:
  requires: [plan]
  tracks: tasks.md
  instruction: |
    1. Workspace     → superpowers:using-git-worktrees
    2a. Executor     → superpowers:subagent-driven-development   (default, Claude Code)
        └ transitive    superpowers:test-driven-development
        └ transitive    superpowers:requesting-code-review
    2b. Executor     → superpowers:executing-plans               (fallback — no subagent support)
    3. Verification  → openspec-verify-change                    (produces verify.md)
    4. Completion    → superpowers:finishing-a-development-branch

The 2a/2b split follows Superpowers' own guidance — executing-plans/SKILL.md states "If subagents are available, use superpowers:subagent-driven-development instead of this skill." On Claude Code, 2a is always the right path; 2b is documented only for constrained runtimes, with an explicit note that transitive TDD and code-review do not carry over under 2b (the author must invoke them manually).

Changes since the draft linked in #780 (commit 6449135)

Reviewers who saw the original fork version will notice the following refinements:

  • New verify artifact + templates/verify.md — the original draft relied on a separate slash command; this version formalizes verification as an artifact so openspec status can track it and openspec validate can check its structure.
  • design demoted to optional — originally tasks.requires: [specs, design]. Experience showed design.md was frequently empty for small changes, causing false incomplete-state signals. Now tasks.requires: [specs] only.
  • Apply step 2 split into 2a/2b — earlier version always invoked subagent-driven-development. This version documents the fallback and explicitly lists transitive skill activation for readability.
  • Expanded templates with format hints derived from OpenSpec's own zod validators:
    • proposal.md — Why-section character limits (50-1000), From/To format for behavioral changes.
    • spec.md — MODIFIED / REMOVED / RENAMED delta sections with archive-time apply order notes.
    • brainstorm.md — Alternatives Considered section (the original had only "Agreed Approach").
  • New INTEGRATION.md — onboarding reference covering integration nature, skill touchpoints, artifact DAG, full change lifecycle, CLI cheat sheet, and the five design decisions behind the schema. Intended for teams adopting this schema in their own repos.

Compatibility

  • Strictly additive. No existing schemas, validators, or CLI behaviors change.
  • Per-change opt-in via --schema sdd-plus-superpowers at /opsx:new time.
  • Graceful fallback. Every Superpowers skill invocation carries a "fall back to manual" clause, so changes authored under this schema remain usable even if Superpowers is uninstalled later.

Testing

  • openspec validate --all --json passes for sample changes authored under this schema.
  • Round-trip tested: /opsx:new --schema sdd-plus-superpowers/opsx:continue through all 6 planning artifacts → /opsx:apply/opsx:verify/opsx:archive, producing a clean archived change with synced delta specs.
  • Templates validated by running OpenSpec's internal zod schemas against example output.

Notes for reviewers

  • Zero changes to core/, CLI commands, or the spec-driven schema.
  • INTEGRATION.md §7 is deliberately a snapshot template (placeholders), not project-specific content — each adopting repo fills in its own capability list, CLI versions, and plugin versions.
  • If preferred, INTEGRATION.md can be moved to docs/ instead of sitting alongside the schema — happy to relocate based on reviewer preference.

Related

Summary by CodeRabbit

  • New Features

    • Added the "sdd-plus-superpowers" workflow: end-to-end spec-driven lifecycle (brainstorm → proposal → design? → specs → tasks → plan → apply → verify) with mapped Superpowers skill touchpoints, worktree-based execution, subagent-driven execution with enforced TDD/code-review flow, and explicit fallback paths.
  • Documentation

    • New integration guide, README, CLI examples, lifecycle walkthrough, artifact DAG, templates, and a verification checklist to standardize outputs and sequencing.

…d INTEGRATION doc

新增 verify artifact + templates/verify.md
新增 INTEGRATION.md(七節 onboarding 文件)
schema.yaml:apply executor 拆 2a/2b、design 變可選、顯式化 TDD/code-review 傳遞
templates/brainstorm.md:加 Alternatives Considered
templates/proposal.md:加 Why 字數限制 + From/To 格式
templates/spec.md:展開 MODIFIED/REMOVED/RENAMED delta + archive 套用順序
@JiangWay JiangWay requested a review from TabishB as a code owner April 14, 2026 02:14
@1code-async
Copy link
Copy Markdown
Contributor

1code-async Bot commented Apr 14, 2026

Task completed.

I'll start by reviewing the PR diff and understanding the codebase context.


View full conversation

Powered by 1Code

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6f74b964-630f-4c34-97dd-d2b2aa8501d9

📥 Commits

Reviewing files that changed from the base of the PR and between 7bf6bae and 31d645f.

📒 Files selected for processing (2)
  • schemas/sdd-plus-superpowers/INTEGRATION.md
  • schemas/sdd-plus-superpowers/schema.yaml
✅ Files skipped from review due to trivial changes (1)
  • schemas/sdd-plus-superpowers/INTEGRATION.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • schemas/sdd-plus-superpowers/schema.yaml

📝 Walkthrough

Walkthrough

Adds a new project-level OpenSpec schema "sdd-plus-superpowers" with integration docs and templates that wire OpenSpec artifact workflows to Superpowers execution skills via instruction-injected skill calls, defining artifact lifecycle (brainstorm → proposal → design/specs → tasks → plan → apply → verify) and detailed apply/verify orchestration.

Changes

Cohort / File(s) Summary
Schema Core
schemas/sdd-plus-superpowers/schema.yaml, schemas/sdd-plus-superpowers/README.md
New workflow/schema definition sdd-plus-superpowers declaring artifacts (brainstorm, proposal, design, specs, tasks, plan, verify, apply) and explicit instruction-level Superpowers skill injection points, outputs, dependencies, apply pre-flight, and verify behavior.
Integration Runbook
schemas/sdd-plus-superpowers/INTEGRATION.md
Comprehensive integration guide and lifecycle runbook: artifact DAG, seven superpowers:* touchpoints, transitive subagent behaviors (TDD/code review), fallback conditions (notably superpowers:executing-plans), CLI flows, worktree/commit rules, and archive/snapshot sequencing.
Templates — Artifacts
schemas/sdd-plus-superpowers/templates/brainstorm.md, .../proposal.md, .../design.md, .../spec.md, .../tasks.md, .../plan.md, .../verify.md
Added structured Markdown templates for brainstorm, proposal, design, delta-specs, tasks checklist, plan, and verification report with format/validation requirements, output redirection guidance, and execution hints for agentic/subagent workflows.

Sequence Diagram(s)

sequenceDiagram
    participant CLI as OpenSpec CLI
    participant Schema as sdd-plus-superpowers/schema
    participant Super as Superpowers (skills)
    participant Git as Git Worktree/Repo
    participant Subagent as Subagent Worker

    CLI->>Schema: start/change lifecycle (/opsx:new / /opsx:continue / /opsx:apply)
    Schema->>Super: invoke superpowers:brainstorm / superpowers:writing-plans / ...
    Super-->>Schema: produce artifacts (brainstorm.md, plan.md, specs, ...)
    Schema->>Git: pre-flight commit change dir & create worktree
    Git->>Subagent: dispatch subagent-driven-development (TDD, per-task reviews)
    Subagent-->>Git: commit/push implementation changes
    CLI->>Schema: trigger verify (/opsx:verify / openspec-verify-change)
    Schema->>Super: invoke superpowers:finishing-a-development-branch / executing-plans (or fallback)
    Super-->>CLI: verification report and archive decision
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 I hopped through brainstorms with pages bright,
Jotted proposals by soft moonlight,
Plans in paw, tasks checked one by one,
Subagents danced, commits pushed—code spun,
Archive snug, specs synced—what fun!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(schemas): add sdd-plus-superpowers — integrate Superpowers skills via custom schema' accurately and concisely describes the main change: adding a new OpenSpec schema that integrates Superpowers skills.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@schemas/sdd-plus-superpowers/INTEGRATION.md`:
- Around line 40-81: The fenced ASCII DAG in INTEGRATION.md opens with an
unlabeled code fence which triggers markdownlint MD040; update the opening fence
for the DAG block (the triple backticks immediately before the ASCII diagram) to
include a language tag such as "text" (i.e. change ``` to ```text) so the block
is explicitly labeled and the linter warning is resolved; ensure the closing
fence remains ``` unchanged.

In `@schemas/sdd-plus-superpowers/README.md`:
- Around line 83-88: The README flow lists /opsx:continue entries and currently
implies that "design" is mandatory; update the sequence text to indicate that
the "design" step is optional (e.g., add "(optional)" or "— optional" after the
`design` entry) so operators know it need not always be performed; modify the
lines containing the `/opsx:continue` entries (specifically the entry
referencing `design`) to include the optional marker and keep formatting
consistent with the surrounding entries.
- Around line 30-34: The fenced diagram block currently has no language tag;
update the code fence around the ASCII workflow (the triple-backtick block
containing "brainstorm ──→ proposal ──→ specs ──→ tasks ──→ plan ...") to
include a language identifier (e.g., change ``` to ```text) so the README.md
passes MD040 linting and renders consistently.

In `@schemas/sdd-plus-superpowers/schema.yaml`:
- Line 1: Normalize the schema file's line endings to LF by converting the file
that contains "name: sdd-plus-superpowers" to use Unix line endings (LF) instead
of CRLF; update the file's line endings (or add a .gitattributes entry for YAML
files to enforce eol=lf) and re-save/commit the file so yamllint no longer
reports "new-lines" errors.

In `@schemas/sdd-plus-superpowers/templates/verify.md`:
- Around line 19-21: The fenced code block in verify.md that contains "<貼上
openspec validate --all 的輸出摘要>" is missing a language identifier (causing
MD040); update the opening fence from ``` to ```text so the block reads as a
text/code block and tools render/lint it consistently, leaving the contained
output unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d8537d19-e0ee-4ea1-b062-787422688d55

📥 Commits

Reviewing files that changed from the base of the PR and between c0f2904 and af76c0b.

📒 Files selected for processing (10)
  • schemas/sdd-plus-superpowers/INTEGRATION.md
  • schemas/sdd-plus-superpowers/README.md
  • schemas/sdd-plus-superpowers/schema.yaml
  • schemas/sdd-plus-superpowers/templates/brainstorm.md
  • schemas/sdd-plus-superpowers/templates/design.md
  • schemas/sdd-plus-superpowers/templates/plan.md
  • schemas/sdd-plus-superpowers/templates/proposal.md
  • schemas/sdd-plus-superpowers/templates/spec.md
  • schemas/sdd-plus-superpowers/templates/tasks.md
  • schemas/sdd-plus-superpowers/templates/verify.md

Comment thread schemas/sdd-plus-superpowers/INTEGRATION.md Outdated
Comment thread schemas/sdd-plus-superpowers/README.md Outdated
Comment thread schemas/sdd-plus-superpowers/README.md
Comment thread schemas/sdd-plus-superpowers/schema.yaml Outdated
Comment thread schemas/sdd-plus-superpowers/templates/verify.md Outdated
cd039 and others added 3 commits April 20, 2026 15:34
…ission-AI#970

- Convert schema.yaml to LF line endings (yamllint)
- Add `text` language tag to ASCII DAG / placeholder code fences
  in README.md, INTEGRATION.md, and templates/verify.md (markdownlint MD040)
- Mark `design` step as optional in README.md stepwise flow

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ive guidance

Apply phase additions in schema.yaml:
- Step 0 (Pre-flight): commit openspec/changes/<name>/ to current
  branch BEFORE creating the worktree. Prevents "untracked files
  would be overwritten by merge" errors when integrating the worktree
  back, and keeps planning-phase artifacts separate from
  implementation-phase commits.
- Post-completion Recommended section: non-blocking guidance to
  produce retrospective.md before archive, with the six evidence-
  first sections (wins / misses / plan deviations / skill compliance
  / surprises / promote candidates). Mentions optional
  workflow-retrospective skill for automation, but works fine with
  manual authoring — no new skill dependency introduced.

INTEGRATION.md updates:
- Document section 3-0 (Pre-flight) with rationale
- Document section 3-5 (Retrospective) as a recommended-but-non-
  blocking habit that raises the quality of every subsequent change

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant